package com.xingkeduo.business.user.service;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description:
 * @Author:gaozifeng
 * @Date 2019/3/1 19:38
 **/
@Service
public class RabbitSendMqService {

    @Autowired
    private AmqpTemplate template;

    public String sendMq(String msg){
        Object sendAndReceive = template.convertSendAndReceive("testRabbit", msg);
        System.out.println("sendAndReceive::"+sendAndReceive);
        return sendAndReceive.toString();
    }
}
